package casa.depesos.app.com.http.data;

import android.os.Parcel;
import android.os.Parcelable;

import androidx.annotation.NonNull;

import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;

public class Bank implements Parcelable {
    @SerializedName("inname")
    @Expose
    public String name;

    @SerializedName("codeid")
    @Expose
    public String code;

    protected Bank(Parcel in) {
        name = in.readString();
        code = in.readString();
    }

    public Bank() {

    }

    public static final Creator<Bank> CREATOR = new Creator<Bank>() {
        @Override
        public Bank createFromParcel(Parcel in) {
            return new Bank(in);
        }

        @Override
        public Bank[] newArray(int size) {
            return new Bank[size];
        }
    };

    @NonNull
    @Override
    public String toString() {
        return name;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(@NonNull Parcel dest, int flags) {
        dest.writeString(name);
        dest.writeString(code);
    }
}
